<template>
	<view>
		<u-list @scrolltolower="scrolltolower" v-if="tMemberPropList.length != 0">
			<u-list-item v-for="(item, index) in tMemberPropList" :key="index">
				<view class="hass_box">
					<image src="../../static/images/crazy/jinbi.png" mode=""></image>
					<view class="box_number">
						<view>数量：{{item.countNum}}</view>
						<view class="">单价：{{item.unitPrice}}</view>
					</view>
					<view class="times">
						<view>
							{{item.consignTime}}
						</view>
					</view>
				</view>
			</u-list-item>
		</u-list>
		<view  v-if="tMemberPropList.length == 0">
		<image style="
		width: 280rpx;
		height: 280rpx;
		margin: 270rpx 230rpx 0;
		" src="../../static/images/fighting.gif" mode=""></image>
		</view>
	</view>
</template>

<script>
	import config from '@/config.js';
	import {
		tMemberProp
	} from '@/api/hassold/hassold.js';
	export default {
		data() {
			return {
				page: 1,
				size: 10,
				tMemberPropList: [],
				imgUrl: config.imgUrl,
				totalSize: 0,
			}
		},
		created() {
			this.gettMemberProp();
		},
		methods: {
			async gettMemberProp() {
				let param = {};
				param.page = this.page;
				param.size = this.size;
				const data = await tMemberProp(param);
				console.log(data);
				let _this = this;
				data.data.pageData.map((i) => {
					_this.tMemberPropList.push(i);
				});
				this.totalSize = data.data.totalSize;
			},

			scrolltolower() {
				//加载时候判断是否还有下一页
				if (this.tMemberPropList.length < this.totalSize) {
					this.page++;
					//则还有下一页
					this.gettMemberProp();
				}
			},

		}
	}
</script>
<style lang="scss" scoped>
	//沙沙
	.hass_box {
		width: 680rpx;
		height: 135rpx;
		background: #15142D;
		border-radius: 14rpx;
		display: flex;
		justify-content: space-between;
		padding: 20rpx;
		margin: 30rpx 0 0 34.88rpx;

		image {
			width: 100rpx;
			height: 100rpx;
		}

		.box_number {
			width: 180rpx;
			font-size: 26rpx;
			font-weight: 400;
			color: #ffffff;
			font-family: "font";

			view {
				padding: 2rpx 0 20rpx 0;
			}
		}

		.times {
			font-size: 26rpx;
			font-weight: 400;
			color: #ffffff;
			font-family: "font";
			margin-top: 35rpx;
		}
	}
</style>